﻿using FluentNHibernate.Mapping;
using MediaSage.Lib.Database.Entities.Client;

namespace MediaSage.Lib.Database.Mappings.Client
{
    internal class ClientConfigMap : ClassMap<ClientConfigEntity>
    {
        public ClientConfigMap()
        {
            Id(x => x.ID).GeneratedBy.GuidComb();
            Map(x => x.LogFile);
            Map(x => x.LogLevel);
            Map(x => x.PopupLogLevel);
            HasOne<ThemeEntity>(x => x.ActiveTheme);
            Map(x => x.ThemeDirectory);
            HasMany(x => x.Themes).Cascade.All().Table("Themes");
        }
    }
}